home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Utilities Experience
/
The Utilities Experience - Volume 1.iso
/
software
/
emulation
/
amoricv0_9
/
src
/
cpumacros_000.asm
< prev
next >
Wrap
Assembly Source File
|
1995-10-29
|
2KB
|
99 lines
; *** Macros Test des drapeaux ***
; *** N et Z
TEST_NZ: MACRO
move.w sr,d0
andi.w #%00001100,d0 ; Bits Z et N
andi.b #%01111101,d4 ; (bits N et Z de P a 0)
or.b TabNZ-TabP(A3,D0.W),D4
ENDM
; *** Macro Test des drapeaux N,Z et C ***
TEST_NZC: MACRO
move.w sr,d0
andi.w #%00001101,d0 ; Bits Z,N et C
andi.b #%01111100,d4 ; (bits N,Z et C de P a 0)
or.b TabNZC-TabP(A3,D0.W),D4
ENDM
; *** Macro Test des drapeaux N,Z,C et V ***
TEST_NZCV: MACRO
move.w sr,d0
andi.w #%00001111,d0 ; Bits Z,N,C et V
andi.b #%00111100,d4 ; (bits N,V,Z et C de P a 0)
or.b TabNZCV-TabP(A3,D0.W),D4
ENDM
; *** Mettre Z de CCR a 0 et X en fction de C de P
SET_C2X:MACRO
move.w sr,D0
TST_PB C_BIT
beq.b SCX_NoCarry\@
bset #4,D0
bra.b SCX_End\@
SCX_NoCarry\@:
bclr #4,D0
SCX_End\@:
move D0,ccr
ENDM
SET_XZ_ADC:MACRO
move.w sr,D0
TST_PB C_BIT
beq.b SXZA_NoCarry\@
bset #4,D0
bra.b SXZA_End\@
SXZA_NoCarry\@:
bclr #4,D0
SXZA_End\@:
bset #2,D0 ; Mettre Z a 1
move D0,ccr
ENDM
SET_XZ_SBC:MACRO
move.w sr,D0
TST_PB C_BIT
bne.b SXZS_NoCarry\@
bset #4,D0
bra.b SXZS_End\@
SXZS_NoCarry\@:
bclr #4,D0
SXZS_End\@:
bset #2,D0 ; Mettre Z a 1
move D0,ccr
ENDM
; *** Macros Tests NZC pour CMP,CPX,CPY ***
TEST_CMP: MACRO
move.w sr,d0
andi.w #%00001101,d0 ; Bits Z,N et C
andi.b #%01111100,d4 ; (bits N,Z et C de P a 0)
or.b TabNZC_CMP-TabP(A3,D0.W),D4
ENDM
TO_LOOP:MACRO
TOLoop\@:
addq.l #1,D0
move.l D0,A5
add.l D0,D0
move.w (A6,D0.L),D6
move.l A5,D0
tst.w D6
beq.b TOFock
cmp.l D6,D7
bne.b TOLoop\@
lea IO_AmigaRoutineTable(PC),A6
lsl.l #2,D0
move.l (A6,D0.L),A6
jmp (A6)
ENDM